  # Copyright 1999-2004 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  # $Header: $
  
  DESCRIPTION="Looking Glass - 3D windows manager writen in Java"
  HOMEPAGE="https://lg3d.dev.java.net/"
  SRC_URI="https://lg3d-core.dev.java.net/files/documents/1834/5501/lg3d-${PV}.tar.gz"
  LICENSE="GPL"
  SLOT="0"
  KEYWORDS="~x86"
  
  #DEPEND=">=dev-java/sun-jdk-1.5.0_beta2
  #dev-java/jai
  #dev-java/sun-java3d" # does not exist jet, but dev-java/blackdown-java3d is in portage
  
  src_install() {
     cd $P/work/
     dodir /usr/share
     cp -R lg3d ${D}/usr/share
     cd ${D}/usr/share/lg3d/bin
     dodir /bin
     echo "#!/bin/sh" >> ${D}/bin/lg3d-session
     echo "cd /usr/share/lg3d/bin" >> ${D}/bin/lg3d-dev
     echo "lg3d-dev" >> ${D}/bin/lg3d-dev
     echo "#!/bin/sh" >> ${D}/bin/lg3d-session
     echo "cd /usr/share/lg3d/bin" >> ${D}/bin/lg3d-session
     echo "lg3d-session" >> ${D}/bin/lg3d-session
     chmod +x ${D}/bin/lg3d-*
     dodir /etc/X11/Sessions
     dosym /bin/lg3d-session /etc/X11/Sessions/lookingglas
  }

  
  pkg_postinst() {
     echo ""
     echo "To run Looking Glass, the screen must be in 24-bit mode"
     echo "To run in window, run lg3d-dev"
     echo "To run as a session, run lg3d-session"
     echo ""
  }
